package com.giao.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

import javax.persistence.*;


@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity(name = "t_book")
public class Book {
    @Id
    private Integer id;
    @Column(name = "book_name")
    private String name;
    private String author;
    private Float price;
    @ManyToOne(targetEntity = Press.class)
    @JoinColumn(name = "pid")
    private Press press;
}
